<template>
	<!-- 工艺防错 -->
	<div class="queue">
		<uni-table ref="table" :loading="loading" border stripe emptyText="暂无数据" style="width:100%;height: 100%;">
			<uni-tr>
				<uni-th align="center">参数项名称</uni-th>
				<uni-th align="center">标准值</uni-th>
				<uni-th align="center">上限值</uni-th>
				<uni-th align="center">下限值</uni-th>

			</uni-tr>
			<uni-tr v-for="(item,index) in data_list" :key="index">
				<uni-td>{{ item.parameterItemName }}</uni-td>
				<uni-td>{{ item.standardValue }}</uni-td>
				<uni-td>{{ item.upperLimitValue }}</uni-td>
				<uni-td>{{ item.lowerLimitValue }}</uni-td>

			</uni-tr>
		</uni-table>
	</div>
</template>
<script>
	export default {
		props: {
			// paramsList: {
			// 	type: Array,
			// 	default: () => []
			// },
			workorder: {
				type: Object,
				default: () => {}
			},
			workLineDetail: {
				type: Object,
				default: () => {}
			},
			workstatList: {
				type: Array,
				default: () => []
			}

		},
		data() {
			return {
				data_list: [],
				loading: false,
				// 查询参数
				queryParams: {

				},
				paramsList: []
			};
		},

		created() {

		},
		mounted() {

			// 获取工艺的详细信息	
			this.$u.api.getWorkOrderDetail(this.workstatList[0].workorderId).then(ele => {

				this.$u.api.getRouteRequestByBomId(ele.data.bomId).then(res => {

					let arr1 = res.data.find(item => item.totel == "工艺要求")
					this.paramsList = arr1.date
					this.data_list = arr1.date.filter(item => item.worklineId == this.workorder
						.worklineId);

				});
			})



		},
		methods: {
			clearData() {
				// this.data_list = [];
			},
			getList() {

			}
		},
	}
</script>
<style lang="scss" scoped>
	.demo {
		width: 100%;
		height: 100px;
		overflow: scroll;
		border: 1px solid red;
	}

	.demo::-webkit-scrollbar {
		width: 12px;
		/* 可以调整滚动条的宽度 */
	}

	/* 更改滚动条的滑块颜色 */
	.demo::-webkit-scrollbar-thumb {
		background-color: #ff0000;
		/* 使用您想要的颜色 */
	}

	.uni-table {
		background-color: black;
	}

	/* 设置表格内容的字体颜色为白色，以确保可读性 */
	.uni-table .uni-table-cell {
		color: white;
	}

	/* 如果需要设置表头的样式，可以使用下面的样式 */
	.uni-table .uni-table-header {
		background-color: darkgray;
	}

	.queue {
		max-height: 100%;
		display: flex;
		padding: 10px;
	}

	.table-content {
		flex: 1;
	}

	.uni-group {
		.uni-button {
			margin: 0 10px;
		}
	}

	.set-top {
		.uni-button {
			margin-left: 10px;
		}
	}

	::v-deep {

		.uni-table,
		.uni-table-th,
		.uni-table-tr {
			background-color: transparent !important;
			// color: #f5f6f7;
		}
	}

	::v-deep {

		.uni-table,
		.uni-table-th,
		.uni-table-tr,
		.uni-table-td {
			text-align: center !important;
			// color: #f5f6f7;
		}
	}

	::-webkit-scrollbar {
		display: none;
	}
</style>